<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>行内块元素与文字垂直居中对齐</title>
    <style>
        .a{
            border: red 1px solid;
        }
        img{
            vertical-align: middle;
        }
    </style>
</head>
<body>
    只对行内或行内块元素生效
    <div class="a">
        <img src="素材/4.png">
        <span>sadasdadasdasdsdasdadasda</span>
    </div>
</body>
</html>